# Update the XMERL_PATH to point at your xmerl installation.
XMERL_PATH=../xmerl

# Do not change anything below this line.
ifeq ($(DEBUG),true)
DEBUG_FLAGS = -DDEBUG
else
DEBUG_FLAGS =
endif

ERLC=erlc
ERLC_FLAGS=-W $(DEBUG_FLAGS) -I $(XMERL_PATH)/inc -o ../ebin
EMULATOR = beam
MODULES= ssl_serv \
	netconf \
	netconf_rpc \
	xml_decode \
	mod_routing \
	mod_system \
	mod_interface \
	mod_ipsecvpn \
	mod_user \
	db

EBIN_FILES=$(MODULES:%=../ebin/%.beam)
EBIN = ../ebin
TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET)

all: $(EBIN_FILES) 

$(EBIN)/%.beam:	%.erl netconf.hrl
	$(ERLC) $(ERLC_FLAGS) $(ERL_COMPILE_FLAGS) -o $(EBIN) $<

clean:
	$(RM) $(TARGET_FILES)
